﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using MINERP.MODEL.FoundationModel;
using MINERP.MODEL.StartOrder;
using ServiceInterfaces.DataContracts;

namespace MINERP.MODEL.StartOrder
{
    public class OrderInfo:OrderInfo_Info
    {
        public OrderBagInfo OrderBage { get; set; }
        public List<PhotoInfo> Photos { get; set; }
        public List<WorkOrderFlowListInfo> workFlows { get; set; }
        public Shop_Info ShopInfo { get; set; }
        public string  PaperFaceName { get; set; }
        public string PapeTypeName { get; set; }
        public bool IsExistProductTemplete { get; set; }//是否已存在产品模版
        public string DefaultPrinterName { get; set; }//产品默认打印机名称
        public string DefaultOutShopName { get; set; }//产品默认委外商名称
        public string Unit { get; set; }//单位
        public string CommonChargeItemNames { get; set; }//附加收费名称列表
        public int ProductTypeCode { get; set; }       //产品类型  1需要设计的产品 2不需要设计的产品 3需要指定尺寸的扩印 4直接扩印  5 不含照片的产品
        public bool IsFinishedGoods { get; set; }   //是否为不含照片的成品
        public string ComputerName { get; set; }    //开单电脑名称
        public bool MovePhotoToTempFolderSuccefull { get; set; }//成功移动产品照片到临时文件夹
        public List<TechCommonChargeItemInfo> techCommonChargeItemInfoList = new List<TechCommonChargeItemInfo>();//节点与收费项目
        public bool IsAddRemark { get; set; } //是否已经手动一键添加备注信息
        public double CoverWidth { get; set; }
        public double CoverHeight { get; set; }

        public string ProductSize//产品尺寸宽X高
        {
            get 
            {
                switch (Unit)
                {
                    case "厘米":
                        return string.Format("{0}X{1}(cm)", Width * 2.54, Height * 2.54);
                    case "英寸":
                        return string.Format("{0}X{1}(Inch)", Width, Height);
                    case "米":
                        return string.Format("{0}X{1}(m)", Width * 2.54 / 100, Height * 2.54 / 100);
                    default:
                        return string.Format("{0}X{1}(cm)", Width * 2.54, Height * 2.54);
                }
            }
        }
    }
}
